#ifndef EVENT_H_
#define EVENT_H_

#include "Engine.h"

namespace TSS
{
	class IEvent
	{
	protected:
		int id;
	public:
		IEvent();
		virtual ~IEvent(){}
		int getID() { return id; }
	};

	enum eventType{
		EVENT_TIMER = 10,
		EVENT_KEYPRESS = 20,
		EVENT_KEYRELEASE = 30,
		EVENT_MOUSECLICK = 40,
		EVENT_MOUSEMOTION = 50,
		EVENT_MOUSEWHEEL = 60,
		EVENT_MOUSEMOVE = 70,
	};

	class TimerEvent : public IEvent {
	public:
		int timerid;
		TimerEvent(int tid);
	};

	class KeyPressEvent : public IEvent {
	public:
		int keycode;
		KeyPressEvent( int key );
	};

	class KeyReleaseEvent : public IEvent {
	public:
		int keycode;
		KeyReleaseEvent( int key );
	};

	class MouseClickEvent : public IEvent {
	public:
		int button;
		MouseClickEvent( int btn );
	};

	class MouseMotionEvent : public IEvent {
	public:
		int deltax,deltay;
		MouseMotionEvent( int dx, int dy );
	};

	class MouseWheelEvent : public IEvent {
	public:
		int wheel;
		MouseWheelEvent( int wheel );
	};

	class MouseMoveEvent : public IEvent {
	public:
		int posx, posy;
		MouseMoveEvent( int px, int py );
	};
};

#endif